pub struct Datetime(i64);

impl Datetime {
    pub fn now() -> Self {
        Datetime(chrono::Local::now().timestamp())
    }
}

impl From<i64> for Datetime {
    fn from(value: i64) -> Self {
        Datetime(value)
    }
}

impl ToString for Datetime {
    fn to_string(&self) -> String {
        chrono::DateTime::from_timestamp(self.0, 0)
            .unwrap()
            .with_timezone(&chrono::Local)
            .to_string()
    }
}
